* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  background: #fff;
  width: 380px;
  min-height: 500px;
}

.container {
  padding: 16px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e0e0e0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 24px;
  height: 24px;
}

.logo h1 {
  font-size: 18px;
  font-weight: 600;
  color: #1a73e8;
}

.settings-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s;
}

.settings-btn:hover {
  background: #f1f3f4;
  color: #333;
}

/* Current Session */
.current-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 16px;
}

.session-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.session-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4285f4;
}

.session-name {
  font-weight: 500;
  color: #333;
}

.session-tabs {
  font-size: 12px;
  color: #666;
}

.session-menu-btn {
  background: none;
  border: none;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s;
}

.session-menu-btn:hover {
  background: #e8eaed;
  color: #333;
}

/* Actions */
.actions {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid #dadce0;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: #f8f9fa;
  border-color: #c0c4c7;
}

.action-btn.primary {
  background: #1a73e8;
  color: #fff;
  border-color: #1a73e8;
}

.action-btn.primary:hover {
  background: #1557b0;
  border-color: #1557b0;
}

/* Sessions Section */
.sessions-section {
  margin-bottom: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.session-count {
  font-size: 12px;
  color: #666;
  background: #f1f3f4;
  padding: 2px 8px;
  border-radius: 12px;
}

.sessions-list {
  max-height: 200px;
  overflow-y: auto;
}

.session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 4px;
}

.session-item:hover {
  background: #f8f9fa;
}

.session-item.active {
  background: #e8f0fe;
  border: 1px solid #dadce0;
}

.session-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.session-item-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.session-item-details {
  flex: 1;
}

.session-item-name {
  font-weight: 500;
  color: #333;
  font-size: 13px;
}

.session-item-meta {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

.session-item-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.session-item:hover .session-item-actions {
  opacity: 1;
}

.session-action-btn {
  background: none;
  border: none;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s;
}

.session-action-btn:hover {
  background: #e8eaed;
  color: #333;
}

.session-action-btn.danger:hover {
  background: #fce8e6;
  color: #d93025;
}

/* Quick Actions */
.quick-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #e0e0e0;
}

.quick-action {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s;
}

.quick-action:hover {
  background: #f1f3f4;
  color: #333;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  max-height: 80%;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid #e0e0e0;
  background: #f8f9fa;
}

/* Form Elements */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
  font-size: 13px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

.form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.form-row input,
.form-row select {
  flex: 1;
}

/* Color Picker */
.color-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-option {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.selected {
  border-color: #333;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #333;
}

/* Proxy Config */
.proxy-config {
  margin-top: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn.primary {
  background: #1a73e8;
  color: #fff;
  border-color: #1a73e8;
}

.btn.primary:hover {
  background: #1557b0;
  border-color: #1557b0;
}

.btn.secondary {
  background: #fff;
  color: #333;
}

.btn.secondary:hover {
  background: #f8f9fa;
}

/* Sessions Grid */
.sessions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.session-card {
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.session-card:hover {
  background: #f8f9fa;
  border-color: #1a73e8;
}

.session-card-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin: 0 auto 8px;
}

.session-card-name {
  font-weight: 500;
  color: #333;
  font-size: 13px;
  margin-bottom: 4px;
}

.session-card-tabs {
  font-size: 11px;
  color: #666;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Checkbox */
input[type="checkbox"] {
  width: auto !important;
  margin-right: 8px;
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #666;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #333;
}

.empty-state p {
  font-size: 14px;
  line-height: 1.5;
}

/* Quick Session Modal */
.modal-description {
  color: #666;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #1a73e8;
}

/* Actions layout adjustment for three buttons */
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.actions .action-btn:first-child {
  grid-column: 1 / -1;
} 